Index: src/main/java/edu/gjoko/schedlr/config/AppAuthenticationFailureHandler.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/config/AppAuthenticationFailureHandler.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
+++ src/main/java/edu/gjoko/schedlr/config/AppAuthenticationFailureHandler.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -0,0 +1,26 @@
+package edu.gjoko.schedlr.config;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.InternalAuthenticationServiceException;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.authentication.AuthenticationFailureHandler;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class AppAuthenticationFailureHandler implements AuthenticationFailureHandler {
+
+    protected Log logger = LogFactory.getLog(this.getClass());
+    @Override
+    public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
+      if (exception instanceof InternalAuthenticationServiceException) {
+          response.sendRedirect(request.getContextPath() + "/login?error=notApproved");
+      } else if (exception instanceof BadCredentialsException) {
+          response.sendRedirect(request.getContextPath() + "/login?error=badCredentials");
+      }
+    }
+}
Index: src/main/java/edu/gjoko/schedlr/config/AppConfig.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/config/AppConfig.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/config/AppConfig.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -5,4 +5,5 @@
 import org.springframework.security.config.core.GrantedAuthorityDefaults;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.web.authentication.AuthenticationFailureHandler;
 import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
 
@@ -15,6 +16,11 @@
 
     @Bean
-    public AuthenticationSuccessHandler myApplicationAuthenticationSuccessHandler() {
+    public AuthenticationSuccessHandler appAuthenticationSuccessHandler() {
         return new AppAuthenticationSuccessHandler();
+    }
+
+    @Bean
+    public AuthenticationFailureHandler appAuthenticationFailureHandler() {
+        return new AppAuthenticationFailureHandler();
     }
 
Index: src/main/java/edu/gjoko/schedlr/config/AppFilter.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/config/AppFilter.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/config/AppFilter.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -1,8 +1,11 @@
 package edu.gjoko.schedlr.config;
 
+import edu.gjoko.schedlr.services.PostgresUserDetailsService;
+import lombok.RequiredArgsConstructor;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.context.SecurityContextImpl;
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.filter.GenericFilterBean;
 
@@ -12,4 +15,5 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import java.io.IOException;
@@ -18,24 +22,40 @@
 import java.util.Map;
 
+@RequiredArgsConstructor
 public class AppFilter extends GenericFilterBean {
+
+    private final PostgresUserDetailsService userDetailsService;
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
         HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
         HttpSession session = httpServletRequest.getSession(false);
+        HttpServletResponse response = (HttpServletResponse) servletResponse;
 
         if(httpServletRequest.getRequestURI().endsWith(".js")
-                || httpServletRequest.getRequestURI().endsWith(".css")
-                || httpServletRequest.getRequestURI().startsWith("/api")) {
+                || httpServletRequest.getRequestURI().endsWith(".css")) {
             filterChain.doFilter(servletRequest, servletResponse);
             return;
         }
+
+        if(httpServletRequest.getRequestURI().startsWith("/api")) {
+            session = ((HttpServletRequest) servletRequest).getSession(true);
+            SecurityContextImpl sci = (SecurityContextImpl) session.getAttribute("SPRING_SECURITY_CONTEXT");
+
+            if(sci != null && session.getAttribute("stakeholderId") == null) {
+                UserDetails userDetails = (UserDetails) sci.getAuthentication().getPrincipal();
+                Long stakeholderId = userDetailsService.loadStakeholderId(userDetails.getUsername());
+                session.setAttribute("stakeholderId", stakeholderId);
+            }
+            filterChain.doFilter(servletRequest, servletResponse);
+            return;
+        }
+
         if(session != null) {
-            Map<String, String> roleTargetUrlMap = new HashMap<>();
-            roleTargetUrlMap.put("ADMIN", "/admin");
-            roleTargetUrlMap.put("CUSTOMER", "/homepage");
-            roleTargetUrlMap.put("BUSINESS_OWNER", "/business_homepage");
             SecurityContextImpl sci = (SecurityContextImpl) session.getAttribute("SPRING_SECURITY_CONTEXT");
             if(sci != null) {
                 UserDetails userDetails = (UserDetails) sci.getAuthentication().getPrincipal();
+                Long stakeholderId = userDetailsService.loadStakeholderId(userDetails.getUsername());
+                session.setAttribute("stakeholderId", stakeholderId);
+
                 final Collection<? extends GrantedAuthority> authorities = userDetails.getAuthorities();
                 for (final GrantedAuthority grantedAuthority : authorities) {
@@ -47,6 +67,8 @@
                             break;
                         case "CUSTOMER":
+                            page = "/homepage";
+                            break;
                         case "BUSINESS_OWNER":
-                            page = "/homepage";
+                            page = "/business_admin";
                             break;
                         default:
Index: src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -2,4 +2,5 @@
 
 import edu.gjoko.schedlr.services.PostgresUserDetailsService;
+import lombok.AllArgsConstructor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -11,4 +12,6 @@
 import org.springframework.security.config.core.GrantedAuthorityDefaults;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.web.access.AccessDeniedHandler;
+import org.springframework.security.web.authentication.AuthenticationFailureHandler;
 import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
 import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
@@ -16,4 +19,5 @@
 @Configuration
 @EnableWebSecurity
+@AllArgsConstructor
 public class AppSecurityConfig extends WebSecurityConfigurerAdapter {
 
@@ -24,10 +28,5 @@
     private final AuthenticationSuccessHandler authenticationSuccessHandler;
 
-    public AppSecurityConfig(PostgresUserDetailsService userDetailsService, BCryptPasswordEncoder passwordEncoder,
-                             AuthenticationSuccessHandler authenticationSuccessHandler) {
-        this.userDetailsService = userDetailsService;
-        this.passwordEncoder = passwordEncoder;
-        this.authenticationSuccessHandler = authenticationSuccessHandler;
-    }
+    private final AuthenticationFailureHandler authenticationFailureHandler;
 
     @Bean
@@ -48,9 +47,10 @@
                 .authenticationEntryPoint(new AppAuthenticationEntryPoint())
                 .and()
-                .addFilterBefore(new AppFilter(), BasicAuthenticationFilter.class)
+                .addFilterAfter(new AppFilter(userDetailsService), BasicAuthenticationFilter.class)
                 .formLogin()
                 .loginPage("/login")
                 .loginProcessingUrl("/login")
                 .successHandler(authenticationSuccessHandler)
+                .failureHandler(authenticationFailureHandler)
                 .defaultSuccessUrl("/homepage")
                 .and()
Index: src/main/java/edu/gjoko/schedlr/config/MvcConfig.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/config/MvcConfig.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/config/MvcConfig.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -2,5 +2,4 @@
 
 import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -16,10 +15,5 @@
         registry.addViewController("/homepage").setViewName("homepage");
         registry.addViewController("/admin").setViewName("admin");
-    }
-
-    @Override
-    public void addResourceHandlers(ResourceHandlerRegistry registry) {
-        registry.addResourceHandler("/resources/**")
-                .addResourceLocations("/resources/");
+        registry.addViewController("/business_admin").setViewName("business_admin");
     }
 }
Index: src/main/java/edu/gjoko/schedlr/controllers/AdminController.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/controllers/AdminController.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/controllers/AdminController.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -1,7 +1,12 @@
 package edu.gjoko.schedlr.controllers;
 
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
+
+import javax.servlet.http.HttpServletRequest;
+import java.security.Principal;
 
 @Controller
@@ -9,6 +14,16 @@
 
     @GetMapping(path = "/admin")
-    public String getAdminPageTemplate(Model model) {
+    public String getAdminPageTemplate(Model model, HttpServletRequest request) {
         return "admin";
     }
+
+    @GetMapping(path = "/business_admin")
+    public String getBusinessAdminPageTemplate(Model model, HttpServletRequest request) {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        String currentPrincipalName = authentication.getName();
+
+        return "business_admin";
+    }
+
+
 }
Index: src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -6,12 +6,9 @@
 import org.springframework.web.bind.annotation.PostMapping;
 
-import java.security.Principal;
-
 @Controller
 public class HomePageController {
 
     @GetMapping(path = "/homepage")
-    public String getHomePageTemplate(Model model, Principal principal) {
-        System.out.println(principal);
+    public String getHomePageTemplate(Model model) {
         return "homepage";
     }
Index: src/main/java/edu/gjoko/schedlr/controllers/LoginController.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/controllers/LoginController.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/controllers/LoginController.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -7,4 +7,7 @@
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.security.Principal;
 
 @Controller
@@ -12,5 +15,6 @@
 
     @GetMapping(path = "/login")
-    public String getMapping(@ModelAttribute Stakeholder customer, Model model) {
+    public String getMapping(@RequestParam(value = "error", required = false) String error,
+                             @ModelAttribute Stakeholder customer, Model model) {
         return "login";
     }
Index: src/main/java/edu/gjoko/schedlr/controllers/RegisterController.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/controllers/RegisterController.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/controllers/RegisterController.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -28,5 +28,5 @@
     @PostMapping(path = "/register_customer")
     public String registerCustomer(@ModelAttribute Stakeholder customer, Model model) {
-        Stakeholder user = stakeholderService.saveStakeholder(customer);
+        stakeholderService.saveStakeholder(customer);
         return "redirect:login";
     }
Index: src/main/java/edu/gjoko/schedlr/controllers/rest/BusinessController.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/controllers/rest/BusinessController.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/controllers/rest/BusinessController.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -4,6 +4,9 @@
 import edu.gjoko.schedlr.services.BusinessService;
 import lombok.AllArgsConstructor;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
@@ -29,3 +32,9 @@
         businessService.updateBusinesses(businessList);
     }
+
+    @GetMapping(path = "/me")
+    public Business getPersonalInfo(HttpServletRequest request) {
+        Long businessOwnerId = (long) request.getSession(true).getAttribute("stakeholderId");
+        return businessService.findByOwner(businessOwnerId);
+    }
 }
Index: src/main/java/edu/gjoko/schedlr/entity/Business.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/entity/Business.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/entity/Business.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -1,4 +1,5 @@
 package edu.gjoko.schedlr.entity;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonManagedReference;
 import com.fasterxml.jackson.annotation.JsonProperty;
@@ -51,8 +52,10 @@
     @Column(name = "created")
     @CreatedDate
+    @JsonIgnore
     private LocalDateTime created;
 
     @Column(name = "modified")
     @LastModifiedDate
+    @JsonIgnore
     private LocalDateTime modified;
 
Index: src/main/java/edu/gjoko/schedlr/entity/Service.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/entity/Service.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/entity/Service.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -2,4 +2,5 @@
 
 import com.fasterxml.jackson.annotation.JsonBackReference;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
@@ -29,4 +30,7 @@
     private Integer duration;
 
+    @Column(name = "price")
+    private Integer price;
+
     @OneToOne(cascade = CascadeType.MERGE)
     @JoinColumn(name = "service_type_id", referencedColumnName = "id")
@@ -40,8 +44,10 @@
     @Column(name = "created")
     @CreatedDate
+    @JsonIgnore
     private LocalDateTime created;
 
     @Column(name = "modified")
     @LastModifiedDate
+    @JsonIgnore
     private LocalDateTime modified;
 }
Index: src/main/java/edu/gjoko/schedlr/entity/Stakeholder.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/entity/Stakeholder.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/entity/Stakeholder.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -1,4 +1,5 @@
 package edu.gjoko.schedlr.entity;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
@@ -42,12 +43,15 @@
 
     @Column(name = "password")
+    @JsonIgnore
     private String password;
 
     @Column(name = "created")
     @CreatedDate
+    @JsonIgnore
     private LocalDateTime created;
 
     @Column(name = "modified")
     @LastModifiedDate
+    @JsonIgnore
     private LocalDateTime modified;
 }
Index: src/main/java/edu/gjoko/schedlr/repositories/BusinessRepository.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/repositories/BusinessRepository.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/repositories/BusinessRepository.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -3,4 +3,5 @@
 import edu.gjoko.schedlr.entity.Business;
 import edu.gjoko.schedlr.entity.BusinessStatus;
+import edu.gjoko.schedlr.entity.Stakeholder;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
@@ -12,3 +13,5 @@
 
     List<Business> findBusinessesByBusinessStatus(BusinessStatus status);
+
+    Business findBusinessByOwner(Stakeholder owner);
 }
Index: src/main/java/edu/gjoko/schedlr/services/BusinessService.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/services/BusinessService.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/services/BusinessService.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -3,13 +3,14 @@
 import edu.gjoko.schedlr.entity.Business;
 import edu.gjoko.schedlr.entity.ServiceType;
+import edu.gjoko.schedlr.entity.Stakeholder;
 import edu.gjoko.schedlr.entity.StakeholderType;
 import edu.gjoko.schedlr.repositories.BusinessRepository;
 import edu.gjoko.schedlr.repositories.ServiceTypeRepository;
 import lombok.AllArgsConstructor;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
-import static edu.gjoko.schedlr.entity.BusinessStatus.ACTIVE;
 import static edu.gjoko.schedlr.entity.BusinessStatus.NEW;
 
@@ -20,8 +21,10 @@
     private final BusinessRepository businessRepository;
     private final ServiceTypeRepository serviceTypeRepository;
+    private BCryptPasswordEncoder bCryptPasswordEncoder;
 
     public void saveBusiness(Business business) {
         saveNewServiceTypes(business);
         business.getOwner().setStakeholderType(StakeholderType.BUSINESS_OWNER);
+        business.getOwner().setPassword(bCryptPasswordEncoder.encode(business.getOwner().getPassword()));
         business.setBusinessStatus(NEW);
         businessRepository.save(business);
@@ -52,3 +55,8 @@
     }
 
+    public Business findByOwner(Long ownerId) {
+        var owner = new Stakeholder();
+        owner.setId(ownerId);
+        return businessRepository.findBusinessByOwner(owner);
+    }
 }
Index: src/main/java/edu/gjoko/schedlr/services/PostgresUserDetailsService.java
===================================================================
--- src/main/java/edu/gjoko/schedlr/services/PostgresUserDetailsService.java	(revision 905079022f7186a4860b626d48726296b486025f)
+++ src/main/java/edu/gjoko/schedlr/services/PostgresUserDetailsService.java	(revision 8bcd64c37eba4cd984953069331c9faa3a916671)
@@ -1,6 +1,12 @@
 package edu.gjoko.schedlr.services;
 
+import edu.gjoko.schedlr.entity.Business;
+import edu.gjoko.schedlr.entity.BusinessStatus;
 import edu.gjoko.schedlr.entity.Stakeholder;
+import edu.gjoko.schedlr.entity.StakeholderType;
+import edu.gjoko.schedlr.repositories.BusinessRepository;
 import edu.gjoko.schedlr.repositories.StakeholderRepository;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.AccessDeniedException;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -16,4 +22,5 @@
 
 @Service
+@RequiredArgsConstructor
 public class PostgresUserDetailsService implements UserDetailsService {
 
@@ -21,9 +28,5 @@
     private final BCryptPasswordEncoder bCryptPasswordEncoder;
 
-    public PostgresUserDetailsService(StakeholderRepository stakeholderRepository,
-                                      BCryptPasswordEncoder bCryptPasswordEncoder) {
-        this.stakeholderRepository = stakeholderRepository;
-        this.bCryptPasswordEncoder = bCryptPasswordEncoder;
-    }
+    private final BusinessRepository businessRepository;
 
     @Override
@@ -33,7 +36,19 @@
             throw new UsernameNotFoundException("Non existing user");
         }
+
+        if(user.getStakeholderType() == StakeholderType.BUSINESS_OWNER) {
+            Business business = businessRepository.findBusinessByOwner(user);
+            if (business.getBusinessStatus() != BusinessStatus.ACTIVE) {
+                throw new SecurityException("User not approved by admin");
+            }
+        }
         Set<GrantedAuthority> grantedAuthorities = new HashSet<>();
         grantedAuthorities.add(new SimpleGrantedAuthority(user.getStakeholderType().name()));
+
         return new User(user.getUsername(), user.getPassword(), grantedAuthorities);
     }
+
+    public Long loadStakeholderId(String username) {
+        return stakeholderRepository.findStakeholderByUsername(username).getId();
+    }
 }
